const template = (`
    <ul class="todo-main" >
        <li @mouseenter="showId = item.id" @mouseleave="showId = -1" v-for="item in taskList" :key="item.id">
          <label>
            <input type="checkbox" @change="isFinished($event,item.id)" :checked="item.isChecked"/>
            <span>{{item.title}}</span>
          </label>
          <button @click="deleteList(item.id)" v-if="showId === item.id" class="btn btn-danger" style="display:block">删除</button>
        </li>
      </ul>
`);
export default {
    template,
    props:['task-list','is-finished','delete-list'],
    data(){
        return {
            showId : -1,
        }
    },
}